<template>
  <div>
    <h3>使用 Vue的 extends动态创建组件</h3>
    <div>
      <el-button @click='open'>打开弹窗</el-button>
    </div>
  </div>
</template>

<script>
export default {
  name: 'dynamic-component',
  methods: {
    open() {
      let instance = this.$toast('你好', 0, 23)

      console.log('实例', instance)

      setTimeout(() => {
        instance.close()
      }, 3000);
    }
  }
}
</script>
